﻿using System;
using System.Collections.Generic;
using System.Linq;
using System.Text;
using System.Threading.Tasks;

namespace EkStudio.com.bean.xml.Unit
{
    public class BeanUtil
    {
        private static Dictionary<string, string[]> dataTabType = null;

        private static Dictionary<string, string[]> formats = null;

        static BeanUtil(){
            //初始数据类型，不同的控件对应的数据类型不一样
            dataTabType = new Dictionary<string, string[]>();
            dataTabType.Add(KT_TEXTFIELD_TYPE, new string[] { KT_DTSTRING, KT_DTINTEGER, KT_DTFLOAT });
            dataTabType.Add(KT_MEMOFIELD_TYPE, new string[] { KT_DTMEMO });
            dataTabType.Add(KT_DATEFIELD_TYPE, new string[] { KT_DTDATETIME });
            dataTabType.Add(KT_BUTTON_TYPE, new string[] { KT_DTSTRING });
            dataTabType.Add(KT_HYPERLINK_TYPE, new string[] { KT_DTSTRING });
            dataTabType.Add(KT_IMAGEBUT_TYPE, new string[] { KT_DTIMAGE });
            dataTabType.Add(KT_COMBOBOX_TYPE, new string[] { KT_DTSTRING });
            dataTabType.Add(KT_COMBOBOXGRID_TYPE, new string[] { KT_DTSTRING });

            //数据格式化类型
            formats = new Dictionary<string, string[]>();
            formats.Add("TextField", new string[] { "", "#0.0", "#0.00", "#0.000", "#0.0000"});
            formats.Add("MemoField", new string[] { KT_DTFORMAT_TEXT,KT_DTFORMAT_HTML});
            formats.Add("DateField", new string[] { "yyyy-MM-dd", "yyyy-MM-dd HH:mm:ss" });

            //{ "key", "value", "id", "var", "default","record_id","status","select","from","where","and","if","or", };
            //系统保存关键字，不可使用
            PROTECT_FEILD_NAME.Add("key");
            PROTECT_FEILD_NAME.Add("value");
            PROTECT_FEILD_NAME.Add("id");
            PROTECT_FEILD_NAME.Add("var");
            PROTECT_FEILD_NAME.Add("default");
            PROTECT_FEILD_NAME.Add("record_id");
            PROTECT_FEILD_NAME.Add("status");
            PROTECT_FEILD_NAME.Add("user_id");
            PROTECT_FEILD_NAME.Add("created");
            PROTECT_FEILD_NAME.Add("has_attachment");
            PROTECT_FEILD_NAME.Add("last_modified");
            PROTECT_FEILD_NAME.Add("has_reminder");
            PROTECT_FEILD_NAME.Add("catalogue");
            PROTECT_FEILD_NAME.Add("tag");

            PROTECT_FEILD_NAME.Add("select");
            PROTECT_FEILD_NAME.Add("from");
            PROTECT_FEILD_NAME.Add("where");
            PROTECT_FEILD_NAME.Add("and");
            PROTECT_FEILD_NAME.Add("if");
            PROTECT_FEILD_NAME.Add("or");

        }



        /// <summary>
        /// 版本号
        /// </summary>
        public const string VERSION = "V1.0.1";

        /// <summary>编辑框类型</summary>
        public static string[] EDITTYPE = { KT_TEXTFIELD_TYPE, KT_DATEFIELD_TYPE, KT_MEMOFIELD_TYPE, KT_COMBOBOX_TYPE, KT_COMBOBOXGRID_TYPE, KT_BUTTON_TYPE, KT_HYPERLINK_TYPE, KT_IMAGEBUT_TYPE };
        /// <summary>下拉框类型</summary>
        public static string[] COMBOTYPE = { "StNotEdit", "StEdit" };
        /// <summary>数据类型</summary>
        public static string[] DATATYPE = { KT_DTSTRING, KT_DTINTEGER, KT_DTFLOAT, KT_DTMEMO, KT_DTDATETIME, KT_DTIMAGE };
        /// <summary>字符大小写类型</summary>
        public static string[] CHARCASE = { "StNormal", "StUpperCase", "StLowerCase" };
        /// <summary>数据位置类型</summary>
        public static string[] ALIGNMENT = { "StLeft", "StCenter", "StRight" };
        /// <summary>数据汇总类型</summary>
        public static string[] SUMMARY = { "StNone", "StSum", "StMin", "StMax", "StAverage" };
        /// <summary>查询类型</summary>
        public static string[] SEARCHTYPE = { "StNone", "StGeneral", "StAdvanced" };

        public static string[] TABLEMODEL = { "StDefault", "StOnlyGrid", "StOnlyWindow" };

        public static string[] MEMORYTYPE = { "StNone", "10", "20", "50" };
        /// <summary>统计图类型</summary>
        public static string[] CHARTTYPE = { CHART_TYPE_ST_DATA,CHART_TYPE_ST_BAR,CHART_TYPE_ST_EQBAR,CHART_TYPE_ST_CURVE};

        /// <summary>事件类型</summary>
        public static string[] EVENTTYPE = { "StEvent", "StIWantEvent", "StSearchEvent" };
        /// <summary>js事件界面类型</summary>
        public static string[] JSCRIPT_FORM_TYPE = { "editForm", "selectForm" };

        /// <summary>界面类型:编辑界面,查询界面,定时器</summary>
        public static string[] EVENT_PLUGIN_TPEY = { JAVA_PLUGIN_TYPE_EVENT, JAVA_PLUGIN_TYPE_TIMER, JAVA_PLUGIN_TYPE_REPORT, JAVA_PLUGIN_TYPE_SDK };
        /// <summary>定时器执行方式</summary>
        public static string[] EVENT_TIMER_TPE = { "TASKEXE_ONCE", "TASKEXE_EVENDAY", "TASKEXE_REPEAT" };

        public static string[] DEFAULT_EDIT_LIST = { "", "@user_id", "@user_name", "@dep_id", "@department", "@date" };

        public static string[] DEFAULT_SEARCH_LIST = { "", "@user_id", "@user_name", "@dep_id", "@department", "@date" , "@firstid", "@lastid" };

        /// <summary>
        /// 模块消息订阅类型StNews 新闻,StFile 文件,StMeet 会议
        /// </summary>
        public static string[] DY_MESSAGE_TYPE_LIST = { "StWork", "StNews", "StFile", "StMeet" };
        /// <summary>
        /// 模块消息订阅权限范围类型
        /// </summary>
        public static string[] DY_MESSAGE_USER_TYPE_LIST = { "StField", "StGlobal", "StDepartment", "StUserRole", "StUser" };

        //-------------------字段类型-----------------------------------------------------
        /**文本框类型*/
        public const string KT_TEXTFIELD_TYPE = "TextField";
        /**备注框类型*/
        public const string KT_MEMOFIELD_TYPE = "MemoField";
        /**常规下拉框*/
        public const string KT_COMBOBOX_TYPE = "ComboBox";
        /**树结构选择框*/
        public const string KT_COMBOBOXTREE_TYPE = "ComboBoxTree";
        /**下拉表格框*/
        public const string KT_COMBOBOXGRID_TYPE = "ComboBoxGrid";
        /**日期选择框*/
        public const string KT_DATEFIELD_TYPE = "DateField";
        /**单选按钮框*/
        public const string KT_RADIOBUT_TYPE = "RadioBut";
        /**多选按钮框*/
        public const string KT_CHECKBOX_TYPE = "CheckBox";
        /**常规按钮框*/
        public const string KT_BUTTON_TYPE = "Button";
        /**超连接框*/
        public const string KT_HYPERLINK_TYPE = "HyperLink";
        /**图片框*/
        public const string KT_IMAGEBUT_TYPE = "ImageBut";
        /**浏览器框*/
        public const string KT_BROWSERBOX_TYPE = "BrowserBox";
        /**标签框*/
        public const string KT_LABELFIELD_TYPE = "LabelField";


        //**********************数据类型********************************/
        /**字符串类型nvarchar*/
        public const string KT_DTSTRING= "dtString";
        /**整形 integer*/
        public const string KT_DTINTEGER = "dtInteger";
        /**文本型 ntext*/
        public const string KT_DTMEMO = "dtMemo";
        /**浮点型 float*/
        public const string KT_DTFLOAT = "dtFloat";
        /**日期型 datetime*/
        public const string KT_DTDATETIME = "dtDateTime";
        /**二进制型 image*/
        public const string KT_DTIMAGE = "dtImage";

        //**************字段dtFormat类型********************************/
        //备注框专用
        public const string KT_DTFORMAT_TEXT = "StText";
        public const string KT_DTFORMAT_HTML = "StHtml";
        //***********1、相对位置************************************
        public const string KT_ALIGN_LEFT = "StLeft";
        public const string KT_ALIGN_CENTER = "StCenter";
        public const string KT_ALIGN_RIGHT = "StRight";

        //**************字段查询类型*************************************/
        public const string KT_QUERY_STNONE = "StNone";
        public const string KT_QUERY_STGENERAL = "StGeneral";
        public const string KT_QUERY_STADVANCED = "StAdvanced";

        public const string ORDER_ASC  = "ASC";
	    public const string ORDER_DESC = "DESC";

        //**********扩展代码类型*****************************************/
        public const string JAVA_PLUGIN_TYPE_EVENT = "StEvent";
        public const string JAVA_PLUGIN_TYPE_TIMER = "StTimer";
        public const string JAVA_PLUGIN_TYPE_REPORT = "StReport";

        public const string JAVA_PLUGIN_TYPE_SDK = "StSdk";




        //**********库存数据映射字段类型******************************************
        /// <summary>库存结存类型</summary>
        public static string[] STOCK_SAVE_TYPE = { STOCK_SAVE_TYPE_THISMONTH, STOCK_SAVE_TYPE_NEXTMONTH };
        /// <summary>库存字段组类型</summary>
        public static string[] STOCK_GROUP_TYPE = { "StLastStock", "StIntoStock", "StOutStock", "StStock" };

        public static string[] STOCK_FIELD_LIST = { MAP_STDATETIME , MAP_STGROUP , MAP_STNUMBER , MAP_STPRICE };
        /// <summary>库存结存字段集类型</summary>
        public static string[] STOCK_MAP_LIST = { STOCK_MAP_FIELD_SUMMARY, STOCK_MAP_FIELD_MONEY, STOCK_MAP_FIELD_PRICE };







        /// <summary>日期字段</summary>
        public const string MAP_STDATETIME = "StDateTime";
        /// <summary>分组字段</summary>
        public const string MAP_STGROUP = "StGroup";
        /// <summary>数字形字段</summary>
        public const string MAP_STNUMBER = "StNumber";
        /// <summary>数字单价形字段</summary>
        public const string MAP_STPRICE = "StPrice";

        public const string STOCK_SAVE_TYPE_THISMONTH = "StThisMonth";

        public const string STOCK_SAVE_TYPE_NEXTMONTH = "StNextMonth";


        public const string STOCK_MAP_FIELD_SUMMARY = "StSummary";

        public const string STOCK_MAP_FIELD_MONEY = "StMoney";

        public const string STOCK_MAP_FIELD_PRICE = "StPrice";

        public const string STOCK_GROUP_ST_RED = "StRed";

        public const string STOCK_GROUP_ST_BLUE = "StBlue";

        //库存分类类型
        /// <summary>结存分组</summary>
        public const string STOCK_GROUP_ST_STOCK = "StStock";

        public const string STOCK_GROUP_ST_LAST_STOCK = "StLastStock";

        public const string STOCK_GROUP_ST_INTO_STOCK = "StIntoStock";

        public const string STOCK_GROUP_ST_OUT_STOCK = "StOutStock";

        public const string STOCK_GROUP_ST_DAYIN_STOCK = "StDayInStock";

        public const string STOCK_GROUP_ST_DAYOUT_STOCK = "StDayOutStock";


        //-------统计图类型------------------------------{ "StData", "StBarChart", "StEqBarChart", "StCurveChart", "StMixedChart" };
        /// <summary>表格数据</summary>
        public const string CHART_TYPE_ST_DATA = "StData";
            /// <summary>饼图</summary>
        public const string CHART_TYPE_ST_BAR = "StBarChart";
        /// <summary>柱形图</summary>
        public const string CHART_TYPE_ST_EQBAR = "StEqBarChart";
        /// <summary>曲线图</summary>
        public const string CHART_TYPE_ST_CURVE = "StCurveChart";
        /// <summary>混合图</summary>
        public const string CHART_TYPE_ST_MIXED = "StMixedChart";





        /// <summary>各种控件类型所拥有的数据类型</summary>
        public static string[] getDataType(string key)
        {
            string[] list = null;
            if (dataTabType.Keys.Contains(key))
            {
                list = dataTabType[key];
            }
            if (list == null) list = new string[] { };
            return list;
        }
        /// <summary>
        /// 格式化类型
        /// </summary>
        /// <returns></returns>
        public static string[] getFormatType(string key)
        {
            string[] list = null;
            if (formats.Keys.Contains(key))
            {
                list = formats[key];
            }
            
            if (list == null) list = new string [] { };
            return list;
        }

        /// <summary>受保护的字段命名</summary>
        public static List<string> PROTECT_FEILD_NAME = new List<string>();

        /// <summary>字段组显示模块值</summary>
        public const string TABLE_SHOWMODEL_DEFAULT = "StDefault";
        /// <summary> 字段组默认行高 </summary>
        public const int TABLE_HEIGHT_DEFAULT = 200;
        /// <summary>字段表格默认宽度 </summary>
        public const int FIELD_WIDTH_DEFAULT = 100;

        /// <summary>字段key默认值</summary>
        public const string FIELD_KEY_VALUE = "Field";
        /// <summary>字段caption 默认值</summary>
        public const string FIELD_CAPTION_VALUE = "Unnamed";
        /// <summary>字段编辑类型默认值</summary>
        public const string FIELD_EDITTYPE_VALUE = "TextField";
        /// <summary>字段值类型默认值</summary>
        public const string FIELD_DATATYPE_VALUE = "dtString";
        /// <summary>事件key默认值</summary>
        public const string EVENT_KEY_VALUE = "EventKey";
        /// <summary>事件caption默认值</summary>
        public const string EVENT_CAPTION_VALUE = "Unnamed";
        /// <summary>事件类型默认值</summary>
        public const string EVENT_TYPE_VALUE = "StEvent";
        /// <summary>扩展代码caption默认值</summary>
        public const string PLUGIN_CAPTION_VALUE = "Unnamed";
        /// <summary>扩展代码默认前置路径</summary>
        public const string EVENT_PACKAGE_VALUE = "com.kootop.plugin";
        /// <summary>统计图默认类型</summary>
        public const string CHART_TYPE_VALUE = CHART_TYPE_ST_DATA;
        /// <summary>记忆默认,只针对一般文本框有效</summary>
        public const string MEMORY_TYPE_VALUE = "StNone";


        //-------------bean基础配置------------------------






        /// <summary> 获取常规事件型的扩展代码</summary>
        public static string getJavaCode_default(string key, string pack)
        {
            StringBuilder java = new StringBuilder();
            if (key != "")
            {

                java.Append("package ").Append(pack).Append(";\n");
                java.Append("import com.kootop.common.console.Console;\n");
                java.Append("import com.kootop.common.user.User;\n");
                java.Append("import com.kootop.module.plugin.JspPluginAbstract;\n");
                java.Append("public class ").Append(key).Append(" extends").Append(" JspPluginAbstract{\n");
                java.Append("	private Console logger  = null;//控制台输出\n");
                java.Append("	private User kt_user = null;//用户信息\n");
                java.Append("	@Override\n");
                java.Append("	public String execute() throws Exception {\n");
                java.Append("		// 此处添加您的代码,请不要修改类默认结构\n");
                java.Append("		kt_user = this.kt_action.getKt_user();\n");
                java.Append("		logger  = Console.getConsole(").Append(key).Append(".class,null);\n\n\n\n");
                java.Append("		return description;\n");
                java.Append("	}\n");

                java.Append("}\n");
            }
            return java.ToString();
        }

        /// <summary>返回报表类型自己定义代码</summary>
        public static string getJavaCode_Report(string key, string pack)
        {
            StringBuilder java = new StringBuilder();
            java.Append("package ").Append(pack).Append(";\n\n");
            java.Append("import com.kootop.common.user.User;\n");
            java.Append("import com.kootop.module.export.AbstractJspExcelExportTool;\n");
            java.Append("import com.kootop.module.plugin.ireport.Jsp2003ExcelReportAbstract;\n");
            java.Append("\n\n");
            java.Append("public class ").Append(key).Append(" extends Jsp2003ExcelReportAbstract{\n");
            java.Append("   private User kt_user = null;//用户信息\n\n\n");
            java.Append("   @Override\n");
            java.Append("   public void Run(){\n");
            java.Append("		// 此处添加您的代码,请不要修改类默认结构\n");
            java.Append("       kt_user = this.kt_action.getKt_user();\n");
            java.Append("       this.setFileName(\"").Append(key).Append(".xls\");\n");
            java.Append("       try {\n");
            java.Append("           AbstractJspExcelExportTool tool = InitWorkBook();\n");
            java.Append("       } catch (Exception e) {}\n");
            java.Append("   }\n");
            java.Append("}");


            return java.ToString();
        }

        public static string getReflectJavaCode(String clazzName,string pack)
        {
            StringBuilder java = new StringBuilder();
            java.Append("package ").Append(pack).Append(";\n\n");
            java.Append("import java.util.ArrayList;\n");
            java.Append("import java.util.Hashtable;\n\n");
            java.Append("import org.apache.log4j.Logger;\n\n");
            java.Append("import com.kootop.bean.billreflect.BillRefectDataNode;\n");
            java.Append("import com.kootop.reflect.plugin.JspReflectAbstract;\n\n");
            java.Append("public class ").Append(clazzName).Append(" extends JspReflectAbstract {\n\n");
            java.Append("   private static Logger logger = Logger.getLogger(").Append(clazzName).Append(".class);\n\n");
            java.Append("   @Override\n");
            java.Append("   protected void ReflectInit(BillRefectDataNode node, String Rid, String Pid,Hashtable<String, Object> table) {\n\n");
            java.Append("   }\n\n");
            java.Append("   @Override\n");
            java.Append("   protected void UpdateBefore(BillRefectDataNode node, String Rid,String Pid, ArrayList<Hashtable<String, Object>> dataList){\n\n");
            java.Append("   }\n\n");
            java.Append("   @Override\n");
            java.Append("   protected void UpdateFinish(BillRefectDataNode node, String Rid, String Pid) {\n\n");
            java.Append("   }\n");
            java.Append("}\n");

            return java.ToString();
        }
        /// <summary> 获取图形统计表的扩展代码</summary>
        public static string getJavaCode_Chart(string key, string pack)
        {
            StringBuilder java = new StringBuilder();
            if (key != "")
            {
                java.Append("package ").Append(pack).Append(";\n\n");
                java.Append("import com.kootop.common.console.Console;\n");
                java.Append("import com.kootop.common.user.User;\n");
                java.Append("import com.kootop.module.plugin.ichart.JspIChartAbstract;\n");
                java.Append("import com.kootop.module.plugin.ichart.JspIChartSupportFactor;\n\n");
                java.Append("public class ").Append(key).Append(" extends").Append(" JspIChartAbstract{\n");
                java.Append("	private Console logger  = null;//控制台输出\n");
                java.Append("	private User kt_user = null;//用户信息\n");
                java.Append("	@Override\n");
                java.Append("	public String execute() throws Exception {\n");
                java.Append("		// 此处添加您的代码,请不要修改类默认结构\n");
                java.Append("		kt_user = this.kt_action.getKt_user();\n");
                java.Append("		logger  = Console.getConsole(").Append(key).Append(".class,null);\n");
                java.Append("       //\n");
                java.Append("       //JspIChartSupportFactor.RETURN_TYPE_SQL \n");
                java.Append("       //	表示this.getPluginResult()的返回值的内容是SQL语句\n");
                java.Append("       //JspIChartSupportFactor.RETURN_TYPE_LIST \n");
                java.Append("       //  表示this.getPluginResult() 内容是ArrayList<Hashtable<String,Object>>\n");
                java.Append("       //JspIChartSupportFactor.RETURN_TYPE_DATA \n");
                java.Append("       //  表示getPluginResult() 内容是处理过的json字符串,系统将不处理直接返回给页面\n");
                java.Append("       this.setPluginType(JspIChartSupportFactor.RETURN_TYPE_SQL);\n\n\n\n");
                java.Append("		return \"\";\n");
                java.Append("	}\n");

                java.Append("}\n");
            }

            return java.ToString();
        }
        /// <summary>获取定时类型的扩展代码 </summary>
        public static string getJavaCode_Timer(string key)
        {
            StringBuilder java = new StringBuilder();
            if (key != "")
            {
                java.Append("package com.kootop.plugin.timer;\n");
                java.Append("import com.kootop.common.console.Console;\n");
                java.Append("import com.kootop.common.runtime.AbstractTimerTask;\n");
                java.Append("/**\n");
                java.Append(" * 请添加代码注释\n");
                java.Append(" * @author MenG_N\n");
                java.Append(" * */\n");
                java.Append("public class ").Append(key).Append(" extends AbstractTimerTask{\n");
                java.Append("\n\n");
                java.Append("	private Console logger  = Console.getConsole(").Append(key).Append(".class, null);//控制台输出\n");
                java.Append("	public ").Append(key).Append("(){\n");
                java.Append("		this.setTaskName(\"请修改成你的名称\");\n");
                java.Append("		/*\n");
                java.Append("		 * 设计执行类型\n");
                java.Append("		 *  <br>TaskExecutiveFactory.TASKEXE_TYPE_ONCE    只执行一次\n");
                java.Append("		 *  <br>TaskExecutiveFactory.TASKEXE_TYPE_EVENDAY 每天定时执行\n");
                java.Append("		 *  <br>TaskExecutiveFactory.TASKEXE_TYPE_REPEAT  间隔时间(秒)执行 计算秒5*60=5分钟\n");
                java.Append("		 * */\n");
                java.Append("		this.setTaskType(TASKEXE_TYPE_REPEAT);\n");
                java.Append("		this.setTaskTime(\"10\");//10秒执行一次(注意：是在第一次执行完后10)\n");
                java.Append("	}\n");
                java.Append("	@Override\n");
                java.Append("	public void call() {\n");
                java.Append("		// TODO 添加执行体\n\n\n\n");
                java.Append("	}\n");
                java.Append("}\n");
            }
            return java.ToString();
        }

        public static string getSDKJavaCode(string key,string package)
        {
            StringBuilder java = new StringBuilder();
            if ("" != key)
            {
                java.Append("package ").Append(package).Append(";").AppendLine().AppendLine();
                java.Append("import org.apache.log4j.Logger;").AppendLine();
                java.Append("import com.kootop.sdk.action.WebSDKPluginAbstract;").AppendLine();
                java.Append("/**\n");
                java.Append(" * 第三方HTTP调用执行,请添加代码注释\n");
                java.Append(" * @author MenG_N\n");
                java.Append(" * */\n");
                java.Append("public class ").Append(key).Append(" extends WebSDKPluginAbstract{").AppendLine().AppendLine().AppendLine();
                java.Append("   private static final String SDKUUID = \"").Append(Guid.NewGuid().ToString().ToUpper()).Append("\";").AppendLine();
                java.Append("   @SuppressWarnings(\"unused\")").AppendLine();
                java.Append("   private static final Logger logger = Logger.getLogger(").Append(key).Append(".class);").AppendLine().AppendLine();
                java.AppendLine();
                java.Append("   public boolean CheckSDKID() {").AppendLine();
                java.Append("       return SDKUUID.equals(kt_action.getSdkId());").AppendLine();
                java.Append("   }").AppendLine();
                java.AppendLine();
                java.Append("   public String execute() throws Exception {").AppendLine();
                java.Append("       return \"\";").AppendLine();
                java.Append("   }").AppendLine();
                java.Append("}").AppendLine();
            }

            return java.ToString();
        }


        public static string getFieldLinkerJsCode(string field_key)
        {
            StringBuilder sb = new StringBuilder();
            sb.Append("function ").Append(field_key).Append("(tr){").AppendLine();
            sb.Append("\tvar record_id_value = $('input[name=record_id]',tr).val();").AppendLine();
            sb.Append("\treturn {'record_id':record_id_value,'showInWin':false}").AppendLine();
            sb.Append("}").AppendLine();

            return sb.ToString();
        }

        /// <summary>
        /// 创建参数处理默认结构
        /// </summary>
        /// <param name="param_key">参数字段Key</param>
        /// <param name="clazzName">类名</param>
        /// <param name="package">包名</param>
        /// <returns></returns>
        public static string getParamPermitJavaCode(string param_key,string clazzName,string package)
        {
            string menth = string.Format("{0}{1}", param_key.Substring(0, 1).ToUpper(), param_key.Substring(1));
            //System.Threading.Thread.CurrentThread.CurrentCulture.TextInfo.ToTitleCase(param_key)
            StringBuilder java = new StringBuilder();
            java.Append("package com.kootop.plugin.").Append(package).Append(";\n\n");
            java.Append("public class ").Append(clazzName).Append("{\n");
            java.Append("   public String get").Append(menth).Append("(String value){").AppendLine();
            java.Append("       String result = \"\";").AppendLine();
            java.Append("       return result;").AppendLine();
            java.Append("   }").AppendLine();
            java.Append("}");
            return java.ToString();
        }
    }
}
